package myapp.advancedapp;

import android.app.Application;
import android.widget.Toast;

import myapp.baselibrary.ExceptionCrashHandler;
import myapp.baselibrary.fixbug.FixBugManager;

/**
 * Created by yang2 on 2017/6/13.
 */

public class AndroidApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        ExceptionCrashHandler.getInstance().init(this);

        _initHotFix();
    }

    private void _initHotFix() {
        //初始化热修复框架
        try {
            FixBugManager.getInstance().init(this);
            Toast.makeText(this,"加载框架成功",Toast.LENGTH_SHORT).show();
        } catch (Exception e) {
            e.printStackTrace();
            Toast.makeText(this,"加载框架失败",Toast.LENGTH_SHORT).show();
        }

    }
}
